
#include "Clinic.h"


Clinic::Clinic(){

}



Clinic::~Clinic(){

}

void Clinic::addClient(Client* client)
{
	if(this->existClient(client))	throw ExistClient();

	this->clientes.push_back(clinte);
}

bool Clinic::clubeClient(Client* client)
{
	for(unsigned int i = 0; i < this->clients.size(); i++)
	{
	// TODO : COMO COMPARAR 2 CLIENTES ??
		if(clients->getName() == this->clients[i]->getName())
			return true;
	}
	return false;
}

void Clinic::addEmployee(Employee* employee)
{
	if(this->existEmployee(employee))	throw ExistEmployee();

	this->employees.push_back(employee);
}

bool Clinic::existEmployee(Employee* employee)
{
	for(unsigned int i = 0; i < this->employees.size(); i++)
	{
	// TODO : COMO COMPARAR 2 EMPREGADOS ??
		if(employees->getName() == this->employees[i]->getName())
			return true;
	}
	return false;
}

void Clinic::addDoctor(Doctor* doctor)
{
	if(this->existDoctor(doctor))	throw ExistDoctor();

	this->doctors.push_back(doctor);
}

bool Clinic::existDoctor(Doctor* doctor)
{
	for(unsigned int i = 0; i < this->doctors.size(); i++)
	{
	// TODO : COMO COMPARAR 2 DCOTRS ??
		if(doctor->getName() == this->doctor[i]->getName())
			return true;
	}
	return false;
}


void Clinic::addRoom(Room* room)
{
	if(this->existRoom(room))	throw ExistRoom();

	this->rooms.push_back(room);
}

bool Clinic::existRoom(Room* room)
{
	for(unsigned int i = 0; i < this->room.size(); i++)
	{
		if(room->getRoom() == this->room[i]->getRoom())
			return true;
	}
	return false;
}

void Clinic::addExamType(ExamType* examType)
{
	if(this->existExamType(examType))	throw ExistExamType();

	this->rooms.push_back(examType);
}

bool Clinic::existExamType(ExamType* examType)
{
	for(unsigned int i = 0; i < this->examType.size(); i++)
	{
		if(examType->getName() == this->examType[i]->getName())
			return true;
	}
	return false;
}